<template>
<<<<<<< HEAD
	<div id="app2">
		<el-container>
			<el-aside width="200px">
				<el-row class="tac">
					<el-col :span="12" id="left">
						<el-menu default-active="2" class="el-menu-vertical-demo">
							<el-menu-item index="3">
								<span slot="title">欢迎光临:&nbsp;{{ username }}</span>
							</el-menu-item>
							<el-menu-item index="1">
								<i class="el-icon-menu"></i>
								<span slot="title">首页</span>
							</el-menu-item>
							<el-submenu index="2">
								<template slot="title">
									<div>
										<i class="el-icon-document"></i>
										<span class="span">页面管理</span>
									</div>
								</template>
								<el-menu-item-group>
									<el-menu-item index="1-1" id="el" @click="myshop1()">我的商铺</el-menu-item>
									<el-menu-item index="1-2" id="el" @click="myshop2()">添加商铺</el-menu-item>
									<el-menu-item index="1-3" id="el" @click="myshop3()">商铺管理</el-menu-item>
									<el-menu-item index="1-4" id="el" @click="myshop4()">食品管理</el-menu-item>
									<el-menu-item index="1-5" id="el" @click="myshop5()">订单管理</el-menu-item>
								</el-menu-item-group>
							</el-submenu>
						</el-menu>
					</el-col>
				</el-row>
			</el-aside>
			<el-main>
				<el-breadcrumb separator="/">
					<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
					<el-breadcrumb-item>
						<a href="/">业务管理</a>
					</el-breadcrumb-item>
					<el-breadcrumb-item></el-breadcrumb-item>
					<el-dropdown>
						<span class="el-dropdown-link">个人中心</span>
						<i class="el-icon-arrow-down el-icon--right"></i>
						<el-dropdown-menu slot="dropdown">
							<el-dropdown-item>个人资料</el-dropdown-item>
							<el-dropdown-item>修改密码</el-dropdown-item>
							<el-dropdown-item>退出登录</el-dropdown-item>
						</el-dropdown-menu>
					</el-dropdown>
				</el-breadcrumb>
				<div style="width: 1000px;">
					<el-input placeholder="订单ID" v-model="dingdan" style="width: 200px;">
					</el-input>
					<el-button type="success" @click="sousuo(dingdan)">
						<i class="icon el-icon-search"></i>
						<span>搜索</span>
					</el-button>
					<el-button type="primary" @click="chongzhi">
						<i class="icon el-icon-refresh"></i>
						<span>重置</span>
					</el-button>
				</div>

				<div class="dingdan">
					<tr>
						<td>客户</td>
						<td>骑手</td>
						<td>订单详情</td>
						<td>下单时间</td>
						<td>订单价格</td>
						<td>订单状态</td>
					</tr>
					<tr v-for="item in list" :key="item.id" class="tr2">
						<td>{{item.user_id}}</td>
						<td>{{item.rider_id}}</td>
						<td>{{item.goods_id}}</td>
						<td>{{item.odate}}</td>
						<td>{{item.gprice}}</td>
						<td>{{item.gflag }}</td>
					</tr>
					<p v-if="this.list.length == 0" class="p1">暂无数据</p>
				</div>
			</el-main>
		</el-container>
	</div>
</template>
<script>
	import a from "../../model/goodsModel.js"
	export default {
		data() {
			return {
				dingdan: "",
				dialogImageUrl: '',
				dialogVisible: false,
				disabled: false,
				input: '',
				username: "",
				list: []
			};
		},
		async created() {
			let info = window.localStorage.getItem("info")
			this.username = info
			let {
				data
			} = await a.get()
			console.log(data)
			this.list = data.data
		},
		methods: {
			async sousuo(dingdan) {
				let {
					data
				} = await a.get({
					dingdan
				})
				console.log(data)
			},
			chongzhi() {
				this.dingdan = ""
			},
			myshop1() {
				this.$router.push("/shops/myshop");
			},
			myshop2() {
				this.$router.push("/shops/add");
			},
			myshop3() {
				this.$router.push("/shops/shop");
			},
			myshop4() {
				this.$router.push("/shops/food");
			},
			myshop5() {
				this.$router.push("/shops/order");
			},
			handleRemove(file) {
				console.log(file);
			},
			handlePictureCardPreview(file) {
				this.dialogImageUrl = file.url;
				this.dialogVisible = true;
			},
			handleDownload(file) {
				console.log(file);
			}
		}
	}
</script>
<style scoped>
	.tr2 {
		display: flex;
	}
	
	.tr2 td {
		flex: 1;
		overflow: hidden;
		flex-wrap: nowrap;
	}
	
	.el-breadcrumb {
		width: 1000px;
	}
	
	.p1 {
		line-height: 100px;
		text-align: center;
	}
	
	.dingdan {
		width: 1000px;
	}
	
	.dingdan tr {
		display: inline-block;
		display: flex;
		width: 100%;
	}
	
	.dingdan tr td {
		flex: 1;
		line-height: 53px;
		border: 1px solid black;
		padding-left: 10px;
	}
	
	.el-input__inner {
		margin-left: 20px;
	}
	
	#el {
		color: #fff;
	}
	
	.span {
		background-color: rgb(10, 6, 51);
	}
	
	.el-menu-item.is-active {
		background-color: rgb(10, 6, 51);
	}
	
	.div {
		margin-bottom: 20px;
	}
	
	.el-breadcrumb {
		border-bottom: 1px solid gray;
		margin-bottom: 20px;
	}
	
	.el-main {
		padding: 0;
		margin-left: 20px;
	}
	
	.el-aside {
		overflow: hidden;
	}
=======
  <div id="app2">
    <el-container>
      <el-aside width="200px">
        <el-row class="tac">
          <el-col :span="12" id="left">
            <el-menu default-active="2" class="el-menu-vertical-demo">
              <el-menu-item index="3">
                <span slot="title">欢迎光临:&nbsp;{{ username }}</span>
              </el-menu-item>
              <el-menu-item index="1">
                <i class="el-icon-menu"></i>
                <span slot="title">首页</span>
              </el-menu-item>
              <el-submenu index="2">
                <template slot="title">
                  <div>
                    <i class="el-icon-document"></i>
                    <span class="span">页面管理</span>
                  </div>
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-1" id="el" @click="myshop1()"
                    >我的商铺</el-menu-item
                  >
                  <el-menu-item index="1-2" id="el" @click="myshop2()"
                    >添加商铺</el-menu-item
                  >
                  <el-menu-item index="1-3" id="el" @click="myshop3()"
                    >商铺管理</el-menu-item
                  >
                  <el-menu-item index="1-4" id="el" @click="myshop4()"
                    >食品管理</el-menu-item
                  >
                  <el-menu-item index="1-5" id="el" @click="myshop5()"
                    >订单管理</el-menu-item
                  >
                </el-menu-item-group>
              </el-submenu>
            </el-menu>
          </el-col>
        </el-row>
      </el-aside>
      <el-main>
        <el-breadcrumb separator="/">
          <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item>
            <a href="/">业务管理</a>
          </el-breadcrumb-item>
          <el-breadcrumb-item></el-breadcrumb-item>
          <el-dropdown>
            <span class="el-dropdown-link">个人中心</span>
            <i class="el-icon-arrow-down el-icon--right"></i>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>个人资料</el-dropdown-item>
              <el-dropdown-item>修改密码</el-dropdown-item>
              <el-dropdown-item>退出登录</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </el-breadcrumb>
        <div style="width: 1000px;">
          <el-input
            placeholder="订单ID"
            v-model="dingdan"
            style="width: 200px;"
          >
          </el-input>
          <el-button type="success" @click="sousuo(dingdan)">
            <i class="icon el-icon-search"></i>
            <span>搜索</span>
          </el-button>
          <el-button type="primary" @click="chongzhi">
            <i class="icon el-icon-refresh"></i>
            <span>重置</span>
          </el-button>
        </div>

        <div class="dingdan">
          <tr>
            <td>客户</td>
            <td>骑手</td>
            <td>订单详情</td>
            <td>下单时间</td>
            <td>订单价格</td>
            <td>订单状态</td>
          </tr>
          <tr v-for="item in list" :key="item.id" class="tr2">
            <td>{{ item.user_id }}</td>
            <td>{{ item.rider_id }}</td>
            <td>{{ item.goods_id }}</td>
            <td>{{ item.odate }}</td>
            <td>{{ item.gprice }}</td>
            <td>{{ item.gflag }}</td>
          </tr>
          <p v-if="this.list.length == 0" class="p1">暂无数据</p>
        </div>
      </el-main>
    </el-container>
  </div>
</template>
<script>
import a from "../../model/goodsModel.js";
export default {
  data() {
    return {
      dingdan: "",
      dialogImageUrl: "",
      dialogVisible: false,
      disabled: false,
      input: "",
      username: "",
      list: []
    };
  },
  async created() {
    let info = window.localStorage.getItem("info");
    this.username = info;
    let { data } = await a.get();
    console.log(data);
    this.list = data.data;
  },
  methods: {
    async sousuo(dingdan) {
      let { data } = await a.get({
        dingdan
      });
      console.log(data);
    },
    chongzhi() {
      this.dingdan = "";
    },
    myshop1() {
      this.$router.push("/shops/myshop");
    },
    myshop2() {
      this.$router.push("/shops/add");
    },
    myshop3() {
      this.$router.push("/shops/shop");
    },
    myshop4() {
      this.$router.push("/shops/food");
    },
    myshop5() {
      this.$router.push("/shops/order");
    },
    handleRemove(file) {
      console.log(file);
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = true;
    },
    handleDownload(file) {
      console.log(file);
    }
  }
};
</script>
<style scoped>
.tr2 {
  display: flex;
}

.tr2 td {
  flex: 1;
  overflow: hidden;
  flex-wrap: nowrap;
}

.el-breadcrumb {
  width: 1000px;
}

.p1 {
  line-height: 100px;
  text-align: center;
}

.dingdan {
  width: 1000px;
}

.dingdan tr {
  display: inline-block;
  display: flex;
  width: 100%;
}

.dingdan tr td {
  flex: 1;
  line-height: 53px;
  border: 1px solid black;
  padding-left: 10px;
}

.el-input__inner {
  margin-left: 20px;
}

#el {
  color: #fff;
}

.span {
  background-color: rgb(10, 6, 51);
}

.el-menu-item.is-active {
  background-color: rgb(10, 6, 51);
}

.div {
  margin-bottom: 20px;
}

.el-breadcrumb {
  border-bottom: 1px solid gray;
  margin-bottom: 20px;
}

.el-main {
  padding: 0;
  margin-left: 20px;
}

.el-aside {
  overflow: hidden;
}
>>>>>>> 4ec8550f4d58e2b9ecb92f69c9f83472b396d829
</style>
